<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        $resultArray = array(
            'userName' =>    '张三',
            'sex'      =>    '男',
            'age'      =>    '26'
        );
        echo json_encode($resultArray);
    }
}